function DilophosaurusControl takes nothing returns nothing
	local timer controlTimer = GetExpiredTimer()
	local unit dilophosaurus = LoadUnitHandle(udg_HT , GetHandleId(controlTimer) , 3)
	local integer whichTarget = 0
	local location targetLocation = null
	local location castLocation = null
	local location dilophosaurusLocation = GetUnitLoc(dilophosaurus)
	local boolean foundTarget = false
	local unit targetUnit = null
	local real distance = 0.0
	//--
	set whichTarget = 0
	loop
	exitwhen whichTarget > udg_TargetPriorityListSize
		set targetUnit = udg_TargetPriorityList[whichTarget]
		set targetLocation = GetUnitLoc(targetUnit)
		set castLocation = targetLocation
		set distance = DistanceBetweenPoints(castLocation , dilophosaurusLocation)
		if GetUnitState(targetUnit , UNIT_STATE_LIFE) > 0.0 and distance < 800.0 then
			call IssueTargetOrder(dilophosaurus , "attack" , targetUnit)
			call IssuePointOrderLoc(dilophosaurus , "spellsteal" , castLocation)
			set foundTarget = true
		endif
		call RemoveLocation(targetLocation)
		call RemoveLocation(castLocation)
	exitwhen foundTarget
	set whichTarget = whichTarget + 1
	endloop
	call RemoveLocation(dilophosaurusLocation)
	//--
	set controlTimer = null
	set dilophosaurus = null
	set targetLocation = null
	set castLocation = null
	set dilophosaurusLocation = null
endfunction

function Trig_InitializeDilophosaurusData_Actions takes nothing returns nothing
	local hashtable abilityHashTable = InitHashtable()
	local integer dilophosaurusId = 'o004'
	//--
	//基本係數
	call SaveReal(udg_DinoTypeDataHashTable , dilophosaurusId , StringHash("MIN_HP") , 50.0)
	call SaveReal(udg_DinoTypeDataHashTable , dilophosaurusId , StringHash("HP_BONUS_MEAN") , 0.0)
	call SaveReal(udg_DinoTypeDataHashTable , dilophosaurusId , StringHash("ORIGINAL_SCALE") , 0.4)
	call SaveReal(udg_DinoTypeDataHashTable , dilophosaurusId , StringHash("SCALE_UP_COEFFICIENT") , 250.0)
	
	//技能列表
	call SaveHashtableHandle(udg_DinoTypeDataHashTable , dilophosaurusId , StringHash("ABILITY_LIST") , abilityHashTable)
	call SaveInteger(abilityHashTable , 0 , StringHash("LIST_SIZE") , 1)
	call SaveReal(abilityHashTable , 0 , StringHash("PROBABILITY_COEFFICIENT") , 300.0)
	call SaveInteger(abilityHashTable , 0 , StringHash("ABILITY") , 'A00X')
	
	//控制程式
	call SaveBooleanExprHandle(udg_DinoTypeDataHashTable , dilophosaurusId , StringHash("DINO_CONTROL_CODE") , Condition(function DilophosaurusControl))
	//--
	set abilityHashTable = null
endfunction

function InitTrig_InitializeDilophosaurusData takes nothing returns nothing
	set gg_trg_InitializeDilophosaurusData = CreateTrigger()
	call TriggerAddAction(gg_trg_InitializeDilophosaurusData , function Trig_InitializeDilophosaurusData_Actions)
endfunction